/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;

namespace VOL.Entity.DomainModels
{
    [Entity(TableCnName = "成本中心",TableName = "Fk_cntr",DetailTable =  new Type[] { typeof(Fk_rcntr_dep_auth)},DetailTableCnName = "成本中心部门授权")]
    public class Fk_cntr:BaseEntity
    {
        /// <summary>
       ///
       /// </summary>
       [Key]
       [Display(Name ="rcntr_id")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int rcntr_id { get; set; }

       /// <summary>
       ///成本中心编码
       /// </summary>
       [Display(Name ="成本中心编码")]
       [MaxLength(50)]
       [Column(TypeName="varchar(50)")]
       [Editable(true)]
       public string rcntr_no { get; set; }

       /// <summary>
       ///成本中心说明
       /// </summary>
       [Display(Name ="成本中心说明")]
       [MaxLength(100)]
       [Column(TypeName="varchar(100)")]
       [Editable(true)]
       public string rcntr { get; set; }

       /// <summary>
       ///负责人
       /// </summary>
       [Display(Name ="负责人")]
       [MaxLength(50)]
       [Column(TypeName="varchar(50)")]
       [Editable(true)]
       public string fzren { get; set; }

       /// <summary>
       ///公司编码
       /// </summary>
       [Display(Name ="公司编码")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? company_id { get; set; }

       /// <summary>
       ///类型(ct成本中心，pr项目订单)
       /// </summary>
       [Display(Name ="类型(ct成本中心，pr项目订单)")]
       [MaxLength(50)]
       [Column(TypeName="varchar(50)")]
       [Editable(true)]
       public string lstype { get; set; }

       [Display(Name ="成本中心部门授权")]
       [ForeignKey("rcntr_id")]
       public List<Fk_rcntr_dep_auth> Fk_rcntr_dep_auth { get; set; }

    }
}